header();
function header(){
    let  timer=document.querySelector(".header .left");
    let d=new Date;
    timer.innerHTML=`${d.getFullYear()}年${d.getMonth()+1}月${d.getDate()}日${d.getHours()}时${d.getMinutes()}分${d.getSeconds()}秒`
    setInterval(()=>{
         d=new Date;
        timer.innerHTML=`${d.getFullYear()}年${d.getMonth()+1}月${d.getDate()}日${d.getHours()}时${d.getMinutes()}分${d.getSeconds()}秒`
    },1000); 
    result = JSON.parse(sessionStorage.getItem('userinFo'))
    let span1 = document.querySelector('.span1')
    let img = document.querySelector('.right img')
    span1.innerHTML = ''
    span1.innerHTML= `欢迎您!${result.y_name}`
    img.src=''
    img.src=`../css/${result.y_img}`
}
// 退出登录
function logout(){
    let flag=window.confirm("您确定要退出吗")
    if(flag){
        sessionStorage.removeItem('login')
        location.href='../html/login.html'
    }
}